<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" import="java.util.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
    <title>越算越聪明的24点</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet"
          href="https://cdn.staticfile.net/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.net/jquery/3.2.1/jquery.min.js"></script>
    <script
            src="https://cdn.staticfile.net/popper.js/1.15.0/umd/popper.min.js"></script>
    <script
            src="https://cdn.staticfile.net/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body>

<h1 align="center">越算越聪明的24点</h1>
<h2 align="center">Java框架技术课程 综合演示项目 (33470027@qq.com)</h2>
<form action="/input">
    <table border="0" class="table">
        <tr>
            <td>输入4个1-13之间的整数</td>
            <td><label>
                <input value="${a}" name="a">
            </label></td>
            <td><label>
                <input value="${b}" name="b">
            </label></td>
            <td><label>
                <input value="${c}" name="c">
            </label></td>
            <td><label>
                <input value="${d}" name="d">
            </label></td>
        </tr>
        <tr>

            <td>
                <a href="${pageContext.request.contextPath}/start" class="btn btn-primary">随机产生</a>
            </td>
            <td>
                <input type="submit" value="确定数据" class="btn btn-info">
            </td>
            <td>
                <a href="${pageContext.request.contextPath}/query" class="btn btn-warning">查数据库</a>
            </td>
            <td>
                <a href="${pageContext.request.contextPath}/solve" class="btn btn-success">快速求解</a>
            </td>

            <td>
                <a href="${pageContext.request.contextPath}/save" class="btn btn-danger">存数据库</a>
            </td>

        </tr>

    </table>

</form>
<h3 align="center">STATUS:${status}</h3>
<table class=" table table-striped">
    <tr>
        <td>id</td>
        <td>numbers</td>
        <td>solution</td>
    </tr>

    <c:forEach items="${cs}" var="cc" varStatus="st">
        <tr>
            <td>${cc.id}</td>
            <td>${cc.numbers}</td>
            <td>${cc.solution}</td>
        </tr>
    </c:forEach>
</table>

</body>
</html>